<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>if...else语句；</title>
</head>
<body>
<script type="text/javascript">
 var a=1;
 if(a>2){
	 alert("a>2");
 }else{
	 alert("a<=2");
 }
 
 var month=6;
 if(month>=1&&month<=3){
	 alert("春天");
 }else if(month>=4&&month<=6){
	 alert("夏天");
 }else if(month>=7&&month<=9){
	 alert("秋天");
 }else if(month>=10&&month<=12){
	 alert("冬天");
 }else{
	 alert("逆天了");
 }
</script>
</body>
</html>